package com.fh.service.impl;

import com.alibaba.fastjson2.JSON;
import com.fh.mapper.dev.DevMapper;
import com.fh.mapper.local.LocalMapper;
import com.fh.service.DevService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author whf
 * @date 2024年07月01日 8:12
 */
@Slf4j
@Service
public class DevServiceImpl implements DevService {

    @Autowired
    private DevMapper devMapper;

    @Autowired
    private LocalMapper localMapper;

    /**
     * 调用
     */
    @Override
    public Object getAllTest() {
        List<Map<String, Object>> allTest = devMapper.getAllTest();
        log.info("User: {}", JSON.toJSONString(allTest));
        List<Map<String, Object>> maps = localMapper.insertMessage();
        log.info("Min: {},",JSON.toJSONString(maps));
        HashMap<String, Object> map = new HashMap<>();
        map.put("DEV",allTest);
        map.put("LOCAL",maps);
        return map;
    }
}
